fix(stirling-pdf-logs): add support for Stirling-PDF 2.9.2+ log format#1795
Conversation
Agent-Logs-Url: https://github.com/crowdsecurity/hub/sessions/6518deb4-7872-4455-95ee-45ed2de286e5 Co-authored-by: buixor <990714+buixor@users.noreply.github.com>
|
Hello @buixor and thank you for your contribution! ❗ It seems that the following scenarios are not part of the 'crowdsecurity/appsec-virtual-patching' collection: 🔴 crowdsecurity/vpatch-CVE-2024-1061 🔴 |
|
Hello @buixor, Scenarios/AppSec Rule are compliant with the taxonomy, thank you for your contribution! |
There was a problem hiding this comment.
Pull request overview
This PR updates the crowdsecurity/stirling-pdf-logs parser to handle Stirling-PDF 2.9.2+ failed-login log lines while keeping compatibility with the pre-2.9.2 format.
Changes:
- Added an additional
groknode to parse the newAuthController“Invalid password for user … from IP …” failed-login format. - Extended the Stirling-PDF test log fixture with new-format samples.
- Regenerated/updated hubtest assertions to validate parsing and enrichment across all stages for the added samples.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
parsers/s01-parse/crowdsecurity/stirling-pdf-logs.yaml |
Adds a second grok pattern to match Stirling-PDF 2.9.2+ failed-login log messages. |
.tests/stirling-pdf-logs/stirling-pdf.log |
Adds new-format failed-login log samples (using private IP space). |
.tests/stirling-pdf-logs/parser.assert |
Updates expected hubtest results to include the additional log entries through s00/s01/s02. |
Stirling-PDF 2.9.2+ changed the failed-login log format: the emitting class changed from
CustomAuthenticationFailureHandlertoAuthController, the level dropped fromERRORtoWARN, and the message structure changed fromFailed login attempt from IP: [X]toInvalid password for user: X from IP: Y.Changes
parsers/s01-parse/crowdsecurity/stirling-pdf-logs.yaml: adds a second grok node alongside the existing one to match the new format, preserving backwards compatibility:.tests/stirling-pdf-logs/stirling-pdf.log: adds three new-format log samples (private IPs)..tests/stirling-pdf-logs/parser.assert: updated to cover the 3 additional entries across all parser stages (s00-raw, s01-parse, s02-enrich).Checklist